# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>

pkgname=monitor
pkgver=0.2.1
epoch=1
pkgrel=1
pkgdesc='Network forensics and sniffer tool'
arch=(loong64 x86_64)
url='https://github.com/jo-lund/monitor'
license=(MIT)
depends=(geoip ncurses)
makedepends=(git re2c setconf)
optdepends=("geoip-database-extra: for extra geolocation data")
source=("git+$url#commit=25255bf76dcf278f713d1df5477fdf4d885d2d79") # tag: v0.2.1
b2sums=(SKIP)

build() {
  cd $pkgname
  ./configure --prefix /usr
  make CFLAGS+='-Wl,-z,now'
}

package() {
  cd $pkgname
  setconf config.mk PREFIX="$pkgdir/usr"
  make install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
